﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Enterprise.Infrastructure;
using Enterprise.Model.OfficeDocument;
using Enterprise.Service.OfficeDocument;
using Enterprise.Model.WorkFlow;
using Enterprise.Service.WorkFlow;
namespace Enterprise.UI.Web.Modules.OfficeDocument
{
    public partial class OfficeDocumentIndex : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                OnStart();
            }
        }

        private void OnStart()
        {
            int UserId = Utility.Get_UserId;
            OfficeDocService odService = new OfficeDocService();
            var checklist = odService.OfficeDocumentUnCheck(UserId);

            var query = from p in odService.OfficeDocumentList()
                        join pp in checklist on p.ODID equals pp.WFID
                        select p;
            GridView1.DataSource = query;
            GridView1.DataBind();
        }

    }
}